package com.thunisoft.incremental.dao;

import com.thunisoft.incremental.common.model.TaskStatus;
import com.thunisoft.incremental.common.model.TaskStatusExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface TaskStatusMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_task_status
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @SelectProvider(type=TaskStatusSqlProvider.class, method="countByExample")
    int countByExample(TaskStatusExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_task_status
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @DeleteProvider(type=TaskStatusSqlProvider.class, method="deleteByExample")
    int deleteByExample(TaskStatusExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_task_status
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @Delete({
        "delete from copy_from.t_task_status",
        "where c_id = #{id,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_task_status
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @Insert({
        "insert into copy_from.t_task_status (c_id, c_task_id, ",
        "c_group_id, n_status, ",
        "dt_start_time, dt_end_time, ",
        "c_data_path, lc_error_log)",
        "values (#{id,jdbcType=VARCHAR}, #{taskId,jdbcType=VARCHAR}, ",
        "#{groupId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
        "#{startTime,jdbcType=TIMESTAMP}, #{entime,jdbcType=TIMESTAMP}, ",
        "#{dataPath,jdbcType=VARCHAR}, #{errorLog,jdbcType=VARCHAR})"
    })
    int insert(TaskStatus record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_task_status
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @InsertProvider(type=TaskStatusSqlProvider.class, method="insertSelective")
    int insertSelective(TaskStatus record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_task_status
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @SelectProvider(type=TaskStatusSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="c_id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="c_task_id", property="taskId", jdbcType=JdbcType.VARCHAR),
        @Result(column="c_group_id", property="groupId", jdbcType=JdbcType.VARCHAR),
        @Result(column="n_status", property="status", jdbcType=JdbcType.INTEGER),
        @Result(column="dt_start_time", property="startTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="dt_end_time", property="entime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="c_data_path", property="dataPath", jdbcType=JdbcType.VARCHAR),
        @Result(column="lc_error_log", property="errorLog", jdbcType=JdbcType.VARCHAR)
    })
    List<TaskStatus> selectByExample(TaskStatusExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_task_status
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @Select({
        "select",
        "c_id, c_task_id, c_group_id, n_status, dt_start_time, dt_end_time, c_data_path, ",
        "lc_error_log",
        "from copy_from.t_task_status",
        "where c_id = #{id,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="c_id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="c_task_id", property="taskId", jdbcType=JdbcType.VARCHAR),
        @Result(column="c_group_id", property="groupId", jdbcType=JdbcType.VARCHAR),
        @Result(column="n_status", property="status", jdbcType=JdbcType.INTEGER),
        @Result(column="dt_start_time", property="startTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="dt_end_time", property="entime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="c_data_path", property="dataPath", jdbcType=JdbcType.VARCHAR),
        @Result(column="lc_error_log", property="errorLog", jdbcType=JdbcType.VARCHAR)
    })
    TaskStatus selectByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_task_status
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @UpdateProvider(type=TaskStatusSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") TaskStatus record, @Param("example") TaskStatusExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_task_status
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @UpdateProvider(type=TaskStatusSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") TaskStatus record, @Param("example") TaskStatusExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_task_status
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @UpdateProvider(type=TaskStatusSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(TaskStatus record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table copy_from.t_task_status
     *
     * @mbggenerated Wed Apr 01 17:51:43 CST 2020
     */
    @Update({
        "update copy_from.t_task_status",
        "set c_task_id = #{taskId,jdbcType=VARCHAR},",
          "c_group_id = #{groupId,jdbcType=VARCHAR},",
          "n_status = #{status,jdbcType=INTEGER},",
          "dt_start_time = #{startTime,jdbcType=TIMESTAMP},",
          "dt_end_time = #{entime,jdbcType=TIMESTAMP},",
          "c_data_path = #{dataPath,jdbcType=VARCHAR},",
          "lc_error_log = #{errorLog,jdbcType=VARCHAR}",
        "where c_id = #{id,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(TaskStatus record);
}